from fastapi import FastAPI
from fastapi.responses import PlainTextResponse

app = FastAPI(debug=True)


@app.get("/")
def index():
    1988 / 0
    return PlainTextResponse("开启Debug模式")


if __name__ == '__main__':
    import uvicorn

    uvicorn.run(app='main:app', reload=True)
